package com.hj.exception;

/**
 /**
 * @author hj
 * @Date 2023/4/26
 * @Description:  HjException
 */
public class HjException extends RuntimeException {

    private int code;
    private String msg;

    public HjException(HjExceptionEnum exception) {
        super(exception.getMsg());
        this.code = exception.getCode();
        this.msg = exception.getMsg();
    }

    public HjException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


}
